import launch
import launch_ros.actions

def generate_launch_description():
    return launch.LaunchDescription([
        launch_ros.actions.Node(
            package='turtlesim',
            executable="turtlesim_node",
            name="turtlesim",
            namespace="turtlesim1"
        ),
        launch_ros.actions.Node(
            package="turtlesim",
            executable="turtlesim_node",
            name="turtlesim",
            namespace="turtlesim2"
        ),
        launch_ros.actions.Node(
            package="turtlesim",
            executable="mimic",
            name="mimic",
            remappings=[("/input/pose","/turtlesim1/turtle1/pose"),
                        ("/output/cmd_vel","/turtlesim2/turtle1/cmd_vel")]
        )
    ])